Module MyModule

  Imports Controls, StdCtrls, Forms, Dialogs

  Class MyForm
    Inherits TForm

    Published Button1 As TButton

    Sub Button1Click(Sender As TObject)
      ShowMessage("Hello!")
    End Sub

    Sub New
      MyBase.Create(null)
      Caption = "My form created in Basic"
      Button1 = New TButton(Me)
      With Button1
       .Parent = Me
       .Caption = "Click Me"
       .Name = "Button1"
       .Left = 10
       .Top = 20
       .OnClick = Button1Click
      End With
    End Sub


  End Class

End Module